<script setup>
import { getCurrentInstance } from 'vue';
import {useRouter} from 'vue-router';
const instance = getCurrentInstance();
import LoginRegisterComVue from '@/components/LoginRegisterCom.vue'
import banner1 from '@/assets/images/banner1.png'
import banner2 from '@/assets/images/banner2.png'
import childBg1 from '@/assets/images/child-bg-1.png'
import childBg2 from '@/assets/images/child-bg-2.png'
const bannerList = [
  {
    img: banner1
  },
  {
    img: banner2
  }
]
const router = useRouter();
function goPage(url) {
  // instance.appContext.config.globalProperties.$router.push(url);
  router.push(url);
}
</script>

<template>
  <div class="header-wrap">
    <img src="@/assets/images/title2.png" alt="标题" class="header-img" />
  </div>
  <LoginRegisterComVue></LoginRegisterComVue>
  <div class="page-banner-wrap">
    <el-carousel height="100%">
      <el-carousel-item v-for="item in bannerList" :key="item">
        <img class="banner-img" :src="item.img" alt="" srcset="" />
      </el-carousel-item>
    </el-carousel>
  </div>
  <div class="tabs-parent">
    <div class="tabs-wrap">
      <div class="tabs-content">
        <div class="tab-item">
          <div class="tab-item-content first">
            <div class="item-icon-wrap">
              <img src="@/assets/images/icon-1.png" alt="icon" class="item-icon" />
            </div>
            <div class="label-desc-wrap">
              <div class="label-wrap">科技型企业白名单</div>
              <div class="label-wrap">基金备投企业储备库名录</div>
            </div>
            <div class="active-label-desc-wrap">
              <div
                class="child-label-desc-wrap"
                :style="{ 'background-image': ` url(${childBg1})` }"
                @click="goPage('/list')"
              >
                <div class="child-title">科技型企业</div>
                <div class="btn one">白名单</div>
              </div>
              <div
                class="child-label-desc-wrap"
                :style="{ 'background-image': ` url(${childBg2})` }"
              >
                <div class="child-title">基金备投企业</div>
                <div class="btn two">储备库名录</div>
              </div>
            </div>
          </div>
        </div>
        <div class="tab-item">
          <div class="tab-item-content">
            <img src="@/assets/images/bg-2.png" alt="bg" class="bg-active-img bg-img" />
            <div class="item-icon-wrap">
              <img src="@/assets/images/icon-2.png" alt="icon" class="item-icon" />
            </div>
            <div class="label-desc-wrap">
              <div class="label-wrap">中原股权交易中心</div>
              <div class="desc-wrap">融资政策</div>
            </div>
            <div class="arrow-icon-wrap">
              <img src="@/assets/images/right-circle.png" alt="icon" class="arrow-icon" />
            </div>
          </div>
        </div>
        <div class="tab-item">
          <div class="tab-item-content">
            <img src="@/assets/images/bg-3.png" alt="bg" class="bg-active-img bg-img" />
            <div class="item-icon-wrap">
              <img src="@/assets/images/icon-3.png" alt="icon" class="item-icon" />
            </div>
            <div class="label-desc-wrap">
              <div class="label-wrap">金融机构</div>
              <div class="desc-wrap">惠企政策</div>
            </div>
            <div class="arrow-icon-wrap">
              <img src="@/assets/images/right-circle.png" alt="icon" class="arrow-icon" />
            </div>
          </div>
        </div>
        <div class="tab-item">
          <div class="tab-item-content">
            <img src="@/assets/images/bg-4.png" alt="bg" class="bg-active-img bg-img" />
            <div class="item-icon-wrap">
              <img src="@/assets/images/icon-4.png" alt="icon" class="item-icon" />
            </div>
            <div class="label-desc-wrap">
              <div class="label-wrap">政府机构</div>
              <div class="desc-wrap">融资政策</div>
            </div>
            <div class="arrow-icon-wrap">
              <img src="@/assets/images/right-circle.png" alt="icon" class="arrow-icon" />
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.header-wrap {
  position: absolute;
  top: 8.7%;
  left: 14.17%;
  width: 57.13%;
  z-index: 20;
}

.header-wrap .header-img {
  width: 100%;
}

.page-banner-wrap {
  height: 61.8%;
}

.page-banner-wrap .el-carousel,
.page-banner-wrap .el-carousel__container,
.page-banner-wrap .el-carousel__item {
  height: 100%;
}

.page-banner-wrap .banner-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.tabs-parent {
  background-image: url(@/assets/images/bgg.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: calc(38.2% - 40px);
  width: 100%;
  padding: 38px 0 35px;
  box-sizing: border-box;
}

.tabs-wrap {
  width: 1368px;
  margin: 0 auto 0;
  height: 100%;
}

.tabs-content {
  display: table;
  margin: 0 auto;
  table-layout: fixed;
  height: 100%;
}

.tabs-content:hover .tab-item.active:not(:hover) {
  width: 260px;
}

.tabs-content:hover .tab-item.active:not(:hover) .tab-item-content {
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tabs-content:hover .tab-item.active:not(:hover) .tab-item-content .item-icon-wrap {
  display: block;
}

.tabs-content:hover .tab-item.active:not(:hover) .tab-item-content .label-desc-wrap {
  flex-direction: column;
}

.tabs-content:hover .tab-item.active:not(:hover) .tab-item-content .label-desc-wrap .label-wrap {
  color: #015293;
}

.tabs-content:hover .tab-item.active:not(:hover) .tab-item-content .label-desc-wrap .desc-wrap {
  color: #484848;
}

.tabs-content:hover .tab-item.active:not(:hover) .bg-default-img {
  display: block;
}

.tabs-content:hover .tab-item.active:not(:hover) .arrow-icon-wrap,
.tabs-content:hover .tab-item.active:not(:hover) .bg-active-img {
  display: none;
}

.tab-item {
  display: table-cell;
  vertical-align: top;
  height: 100%;
  width: 260px;
  box-sizing: border-box;
  transition: width 0.5s;
}

.tab-item + .tab-item {
  padding-left: 16px;
}

.tab-item .tab-item-content {
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #79b4f0;
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.tab-item .tab-item-content .bg-img {
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 1;
}

.tab-item .tab-item-content .item-icon-wrap {
  font-size: 0;
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.tab-item .tab-item-content .item-icon-wrap .item-icon {
  width: 100px;
  height: 100px;
}

.tab-item .tab-item-content .label-desc-wrap {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.tab-item .tab-item-content .label-desc-wrap .label-wrap {
  font-size: 22px;
  font-family:
    Microsoft YaHei-Bold,
    Microsoft YaHei;
  font-weight: 700;
  color: #015293;
  line-height: 36px;
  overflow: hidden;
  white-space: nowrap;
}

.tab-item .tab-item-content .label-desc-wrap .desc-wrap {
  font-size: 20px;
  font-family:
    Microsoft YaHei-Regular,
    Microsoft YaHei;
  font-weight: 400;
  color: #484848;
  line-height: 36px;
  margin-top: 11px;
  overflow: hidden;
  white-space: nowrap;
}

.tab-item .tab-item-content .bg-default-img {
  display: block;
}

.tab-item .tab-item-content .bg-active-img {
  display: none;
}

.tab-item .tab-item-content .arrow-icon-wrap {
  font-size: 0;
  width: 33px;
  position: relative;
  z-index: 2;
  display: none;
}

.tab-item .tab-item-content .arrow-icon-wrap .arrow-icon {
  width: 100%;
}

.tab-item .tab-item-content .active-label-desc-wrap {
  display: none;
  width: 100%;
  height: 100%;
}

.tab-item .tab-item-content .active-label-desc-wrap .child-label-desc-wrap {
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 43px;
  box-sizing: border-box;
}

.tab-item .tab-item-content .active-label-desc-wrap .child-label-desc-wrap .child-title {
  font-size: 30px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #fff;
  line-height: 30px;
}

.tab-item .tab-item-content .active-label-desc-wrap .child-label-desc-wrap .btn {
  margin-top: 8px;
  height: 29px;
  background: -webkit-gradient(linear, left top, left bottom, from(#3467b8), to(#04337e));
  background: linear-gradient(180deg, #3467b8, #04337e);
  border: 1px solid #5a94e5;
  border-radius: 15px;
  text-align: center;
  box-sizing: border-box;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #a5cdff;
  line-height: 30px;
}

.tab-item .tab-item-content .active-label-desc-wrap .child-label-desc-wrap .btn.one {
  width: 73px;
}

.tab-item .tab-item-content .active-label-desc-wrap .child-label-desc-wrap .btn.two {
  width: 130px;
}

.tab-item.active {
  width: 513px;
}

.tab-item.active .tab-item-content {
  align-items: flex-start;
  justify-content: space-between;
  padding: 46px 0 26px 40px;
}

.tab-item.active .tab-item-content.first {
  background-color: transparent !important;
  border: none !important;
}

.tab-item.active:first-child .tab-item-content {
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

.tab-item.active:first-child .tab-item-content .label-desc-wrap {
  display: none;
}

.tab-item.active:first-child .tab-item-content .active-label-desc-wrap {
  display: block;
}

.tab-item.active:first-child .tab-item-content .active-label-desc-wrap .child-label-desc-wrap {
  height: calc(50% - 13px);
}

.tab-item.active:first-child
  .tab-item-content
  .active-label-desc-wrap
  .child-label-desc-wrap
  + .child-label-desc-wrap {
  margin-top: 26px;
}

.tab-item.active .item-icon-wrap {
  display: none;
}

.tab-item.active .label-desc-wrap {
  flex-direction: row;
}

.tab-item.active .label-desc-wrap .label-wrap {
  color: #fff;
}

.tab-item.active .label-desc-wrap .desc-wrap {
  color: #fff;
  margin-left: 12px;
}

.tab-item.active .bg-default-img {
  display: none;
}

.tab-item.active .arrow-icon-wrap,
.tab-item.active .bg-active-img {
  display: block;
}

.tab-item:hover {
  width: 513px !important;
}

.tab-item:hover .tab-item-content {
  align-items: flex-start;
  justify-content: space-between;
  padding: 46px 0 26px 40px;
}

.tab-item:hover .tab-item-content.first {
  background-color: transparent !important;
  border: none !important;
}

.tab-item:hover:first-child .tab-item-content {
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

.tab-item:hover:first-child .tab-item-content .label-desc-wrap {
  display: none;
}

.tab-item:hover:first-child .tab-item-content .active-label-desc-wrap {
  display: block;
}

.tab-item:hover:first-child .tab-item-content .active-label-desc-wrap .child-label-desc-wrap {
  height: calc(50% - 13px);
}

.tab-item:hover:first-child
  .tab-item-content
  .active-label-desc-wrap
  .child-label-desc-wrap
  + .child-label-desc-wrap {
  margin-top: 26px;
}

.tab-item:hover .item-icon-wrap {
  display: none;
}

.tab-item:hover .label-desc-wrap {
  flex-direction: row;
}

.tab-item:hover .label-desc-wrap .label-wrap {
  color: #fff;
}

.tab-item:hover .label-desc-wrap .desc-wrap {
  color: #fff;
  margin-left: 12px;
}

.tab-item:hover .bg-default-img {
  display: none;
}

.tab-item:hover .arrow-icon-wrap,
.tab-item:hover .bg-active-img {
  display: block;
}
</style>
